package cn.xz.zysjz.utils;

import android.widget.Toast;
import cn.xz.zysjz.base.BaseApplication;

/**
 * Toast方法封装工具类-吐司提示*/
public class ToastUtils {

    private static Toast sToast;

    public static void show(String s){
        try {
            if (sToast != null) {
                sToast.cancel();
                sToast = null;
            }
            sToast = Toast.makeText(BaseApplication.getContext(), "", Toast.LENGTH_SHORT);
            sToast.setText(s);
            sToast.show();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
